<template>
  <view class="home">
    <LoginComponent></LoginComponent>
    <TopComponent></TopComponent>
    <MainComponent></MainComponent>
    <StatusComponent></StatusComponent>
    <ButtomComponent></ButtomComponent>
  </view>

</template>

<script lang="ts" setup name="PageHome">
import {  reactive,onMounted,toRaw } from "vue";
import TopComponent from "./components/top.vue"
import MainComponent from "./components/main.vue"
import ButtomComponent from "./components/buttom.vue"
import StatusComponent from "./components/status.vue"
import LoginComponent from  "./components/login/login.vue"
// const columns = ref();
// const fieldValue = ref("");
// const showPicker = ref(false);
// import urlShip from '@/assets/png/ship.png'
// AgentId：1001149
// sec：vAf7bUoNHIGdJv81PCz10HFoDIDQ1Tfod0eGdGGZnMQ
// corpid：wl6e538311bc
// 请求接口地址：http://jstxwx.cnpc.com.cn:10082
// 接口文档：http://jstxwx.cnpc.com.cn:10081/api/doc#10013
// 注：需要集成方提供调用接口的源ip，否则无法调用接口
const state = reactive({
    AgentId:'1001149',
    sec:'vAf7bUoNHIGdJv81PCz10HFoDIDQ1Tfod0eGdGGZnMQ',
    corpid:'wl6e538311bc', // appid
    REDIRECT_URl:'',
    SCOPE:'snsapi_base',
    STATE:''
})
const { corpid,AgentId,REDIRECT_URl,SCOPE,STATE} = toRaw(state)  
const codeUrl = `http://jstxwx.cnpc.com.cn:10082/connect/oauth2/authorize?appid=${corpid}&redirect_uri=${REDIRECT_URl}&response_type=code&scope=${SCOPE}&agentid=${AgentId}&state=${STATE}#wechat_redirect`

onMounted(() => {
  console.log(codeUrl,'codeUrl');
});


</script>
<style scoped lang="less">
.home{
  display: flex;
  height: 100vh;
  flex-wrap: nowrap;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
</style>

